{% extends "admin/login.html" %}
{% load i18n admin_static %}

{% block clock %}{% endblock %}

{% block content %}
	{% if messages %}
		{% for message in messages %}
			<p class="errornote alert alert-error">
				{{ message }}
			</p>
	    {% endfor %}
	{% endif %}

	<div id="content-main">
	    <h1><i class="icon-lock icon-white"></i> Sign in</h1>
	
		{% if write_admin %}
	  		<div style="text-align: center;">
				<p><strong>Oops...It seems that you have no permission to do this.</strong></p>
				<p><a href="mailto:{{ admin }}">Mail Admin and request the permission</a></p>
				<div style="clear:both; height:10px"></div>
	  		</div>
		{% endif %}
	
		{% if write_admin %}
			<div class="form-row">
				<hr style="height:3px" />
	  		</div>
			<div style="text-align: center;">
				<p>Then, You can retry</p>
			</div>
		{% endif %}
	
		<div class="form-row" style="text-align: center;">
			<a href="{{ auth_url }}?client_id={{ client_id }}&response_type=code&scope={{ scope }}&redirect_uri={{ redirect_uri }}&state=security_token%3D{{ security_token }}%26url%3D{{ request.build_absolute_uri }}" onclick="window.open(this.href, 'openid_popup', 'width=650,height=580');return false">
				<img style="height: 4em" src="{{ STATIC_URL }}base/img/login.png" alt="Sign in with Google" />
				<!-- <img style="height: 4em" src="https://developers.google.com/accounts/images/sign-in-with-google.png" alt="Sign in with Google" /> -->
			</a>      
		</div>
	</div>
{% endblock %}
